[IA64] Fix domain reboot bug
authorawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Thu, 30 Mar 2006 19:41:48 +0000 (12:41 -0700)
committerawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Thu, 30 Mar 2006 19:41:48 +0000 (12:41 -0700)
commit727b7014d8058972aa4426e8ed43438ea12aed6b
tree8ec75a2891baa8e98e1e2e5032b4896e9d8415dc
parent1421ca9681ca47576857ef7ee7727327c687370f
[IA64] Fix domain reboot bug

Actually domain reboot issue is not caused by our previous patch
to solve schedule_tail, which instead helps to find a severe HOST_SMP
plus domain destroy bug.

The major reason is that currently VHPT table for dom0/domU is per LP,
while domain destroy only issues vhpt_flush on current LP (dom0 is running).
So VHPT table is not flushed on the LP that destroyed domU is running.

The mechanism of domain reboot is to kill current domain and create a new
domain with same configuration. Since region id recycle is added last time
with domain destroy support, the new created domain will inherit same
region id as previous one. Under this case, the stale entries in
VHPT table will make new domU halt.

Before applying our schedule_tail patch, domU will keep same pta
value as idle domain when first created where vhpt walker is disabled.
Because we use bvt as default scheduler, context switch never happens
as long as domU is runnable. That means domU will have vhpt DISABLED
in whole life cycle. So even vhpt on that LP is not flushed, domU
still runs correctly.

So we need to send IPI to target LP to flush right vhpt table. Especially,
based on our previous patch for schedule_tail, domU can get performance
gain by enabling vhpt walker.

Signed-off-by: Zhang xiantao <xiantao.zhang@intel.com>
Signed-off-by: Kevin Tian <kevin.tian@intel.com>
xen/arch/ia64/linux-xen/smp.c
xen/arch/ia64/xen/domain.c
xen/arch/ia64/xen/vhpt.c
xen/include/asm-ia64/vhpt.h